Paging is a memory management technique that allows applications to refer to a virtual memory having a size that is larger than the available physical memory (e.g., RAM—Random Access Memory), by using a secondary storage for data that does not fit into the physical memory. The secondary storage is generally a non-volatile storage, such as SSD (Solid State Device), because such kind of storage is usually much cheaper than RAM and suitable for storing a larger amount of data than is feasible to be saved in RAM. Using a non-volatile storage is a must when the data managed in the virtual memory is updated and needed to be saved in a persistent repository. The virtual memory space is divided into fixed size blocks, called pages. A page that is not currently in the RAM is swapped into the RAM from the secondary storage upon demand to read/write from/to a virtual address covered by the page. If there is no empty space in the RAM for accommodating the requested page, then another page, which is not being used, is swapped out (evicted, paged-out) from the RAM. If the page is dirty, i.e., contains data that was not written to the secondary storage, then the dirty page should be flushed (written) to the secondary storage, prior to being evicted from the RAM.
Operating Systems (OS) generally provide paging mechanism to applications that handle a large amount of data. However, the application has no control on when and how the data is paged out to the secondary storage, leading to a problem of consistency, where the persistent image on the secondary storage does not represent a consistent point in time of the application data, so upon recovery from failure, the data that is read to memory would not comply with a consistent point in time. The OS's paging mechanism further requires that the data is stored on the secondary storage in exactly the same way it is represented in the memory. Therefore, when a substantial number of pages that reside in memory are even slightly amended, flushing of dirty pages involves a large amount of data that is needed to be written to the secondary storage, since the entire page is written.
There is a need to minimize the flush time of dirty data from the memory when large amount of data updates is expected, especially when the updates involve small data portion across many pages, and also especially in cases where during flush, access to the virtual memory is needed to be blocked, so as not to ruin a consistent image in the secondary storage.